import { NgModule } from "@angular/core";
import { PreloadAllModules, RouterModule, Routes } from "@angular/router";

const routes: Routes = [
  {
    path: "",
    loadChildren: () =>
      import("./tabs/tabs.module").then((m) => m.TabsPageModule),
  },
  {
    path: "login",
    loadChildren: () =>
      import("./login/login.module").then((m) => m.LoginPageModule),
  },
  {
    path: "reg",
    loadChildren: () => import("./reg/reg.module").then((m) => m.RegPageModule),
  },
  {
    path: "reg-reset",
    loadChildren: () =>
      import("./reg-reset/reg-reset.module").then((m) => m.RegResetPageModule),
  },
  {
    path: "phdetail",
    loadChildren: () =>
      import("./phdetail/phdetail.module").then((m) => m.PHdetailPageModule),
  },

  {
    path: "cate",
    loadChildren: () =>
      import("./cate/cate.module").then((m) => m.CatePageModule),
  },
  {
    path: "ranking",
    loadChildren: () =>
      import("./ranking/ranking.module").then((m) => m.RankingPageModule),
  },
  {
    path: "sort",
    loadChildren: () =>
      import("./sort/sort.module").then((m) => m.SortPageModule),
  },
  {
    path: "search",
    loadChildren: () =>
      import("./search/search.module").then((m) => m.SearchPageModule),
  },
  {
    path: "contact",
    loadChildren: () =>
      import("./contact/contact.module").then((m) => m.ContactPageModule),
  },
  {
    path: "delect",
    loadChildren: () =>
      import("./delect/delect.module").then((m) => m.DelectPageModule),
  },
  {
    path: "history",
    loadChildren: () =>
      import("./history/history.module").then((m) => m.HistoryPageModule),
  },
  {
    path: "tabs/tab1",
    loadChildren: () =>
      import("./tab1/tab1.module").then((m) => m.Tab1PageModule),
  },
  {
    path: "tabs/tab2",
    loadChildren: () =>
      import("./tab2/tab2.module").then((m) => m.Tab2PageModule),
  },
  {
    path: "tabs/tab3",
    loadChildren: () =>
      import("./tab3/tab3.module").then((m) => m.Tab3PageModule),
  },
];
@NgModule({
  imports: [
    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }),
  ],
  exports: [RouterModule],
})
export class AppRoutingModule {}
